package components;

public class GlobalConstants 
{
	// Path:
	public static final String URL_HOST = "http://javakicker.de";
	public static final String URL_PATH = "";
	public static final String URL_PORT = "";
	public static final String URL_COMPLEATE = URL_HOST + URL_PORT + URL_PATH;
	
	public static final String PATH_BASE = "/var/www/web1";
	public static final String PATH_JAVAKICKER = "/var/www/web1/javakicker";
	public static final String PATH_TEAMS = "/var/www/web1/javakicker/teams";
	public static final String PATH_DEPEND = "/var/www/web1/javakicker/depend/";
	public static final String PATH_VIEWER = "/var/www/web1/javakicker/viewdata";
	
	
	// Test-Player-Code:
	public static final String TEST_PLAYER_JAVA = "import java.awt.Point;\n"+
			"\n"+
			"import de.javakicker.Player;\n"+
			"import de.javakicker.SoccerAction;\n"+
			"\n"+
			"\n"+
			"// TODO: Auto-generated Javadoc\n"+
			"\n"+
			"public class TestPlayer extends Player\n"+
			"{\n"+
			"\n"+
			"  public TestPlayer()\n"+
			"  {}\n"+
			"	\n"+
			"	/* (non-Javadoc)\n"+
			"	 * @see de.sayk.roboball.Player#makeMove()\n"+
			"	 */\n"+
			"	public SoccerAction makeMove()\n"+
			"	{\n"+
			"		Point myPos = getMyPos();\n"+
			"		Point ballPos = getBallPos();\n"+
			"\n"+
			"		switch (selfBallAround())\n"+
			"		{\n"+
			"			case UP:\n"+
			"				if (isSelfPassPossible(UP))\n"+
			"					return SoccerAction.pass(UP);\n"+
			"				else\n"+
			"				{\n"+
			"					switch (lookTo(UP, 2))\n"+
			"					{\n"+
			"						case FREE:\n"+
			"						case WALL:\n"+
			"						case OTHER_TEAM:\n"+
			"							return SoccerAction.move(UP);\n"+
			"						case MY_TEAM:\n"+
			"							if (lookTo(LEFT) == FREE ||\n"+
			"								lookTo(LEFT, 2) == FREE)\n"+
			"								return SoccerAction.move(LEFT);\n"+
			"							else if (lookTo(RIGHT) == FREE ||\n"+
			"									 lookTo(RIGHT, 2) == FREE)\n"+
			"								return SoccerAction.move(RIGHT);\n"+
			"					}\n"+
			"					if (lookTo(LEFT) == FREE\n"+
			"						&& nextOwnRobotAround(LEFT) <= nextOtherRobotAround(LEFT))\n"+
			"						return SoccerAction.dribble(LEFT);\n"+
			"					else if (lookTo(RIGHT) == FREE\n"+
			"							 && nextOwnRobotAround(RIGHT) <= nextOtherRobotAround(RIGHT))\n"+
			"						return SoccerAction.dribble(RIGHT);\n"+
			"					else if (lookTo(DOWN) == FREE\n"+
			"							 && nextOtherRobotAround(DOWN) == Integer.MAX_VALUE)\n"+
			"						return SoccerAction.dribble(DOWN);\n"+
			"					return SoccerAction.nothing();\n"+
			"				}\n"+
			"\n"+
			"			case DOWN:\n"+
			"				if (lookTo(UP) == FREE &&\n"+
			"					(nextOwnRobotAround(UP) <= nextOtherRobotAround(UP)))\n"+
			"					return SoccerAction.dribble(UP);\n"+
			"				else if (lookTo(LEFT) == FREE &&\n"+
			"						 (nextOwnRobotAround(LEFT) <= nextOtherRobotAround(LEFT)))\n"+
			"					return SoccerAction.dribble(LEFT);\n"+
			"				else if (lookTo(RIGHT) == FREE &&\n"+
			"						 (nextOwnRobotAround(RIGHT) <= nextOtherRobotAround(RIGHT)))\n"+
			"					return SoccerAction.dribble(RIGHT);\n"+
			"				else\n"+
			"				{\n"+
			"					if (lookToRel(ballPos, DOWN) == MY_TEAM)\n"+
			"						return SoccerAction.move(UP);\n"+
			"					else if (lookToRel(ballPos, DOWN) == OTHER_TEAM)\n"+
			"						return SoccerAction.move(DOWN);\n"+
			"					if (ballPos.y < getFieldHeight() - 3\n"+
			"						&& nextOwnRobotAround(offsetPoint(ballPos, DOWN)) <=\n"+
			"						nextOtherRobotAround(offsetPoint(ballPos, DOWN)))\n"+
			"						return SoccerAction.move(DOWN);\n"+
			"					else if (lookTo(LEFT) == OTHER_TEAM &&\n"+
			"							 lookTo(LEFT, 2) == FREE)\n"+
			"							return SoccerAction.move(LEFT);\n"+
			"					else if (lookTo(RIGHT) == OTHER_TEAM &&\n"+
			"							 lookTo(RIGHT, 2) == FREE)\n"+
			"							return SoccerAction.move(RIGHT);\n"+
			"					else if (lookTo(LEFT) == OTHER_TEAM)\n"+
			"						return SoccerAction.move(LEFT);\n"+
			"					else if (lookTo(RIGHT) == OTHER_TEAM)\n"+
			"						return SoccerAction.move(RIGHT);\n"+
			"					else\n"+
			"						return SoccerAction.nothing();\n"+
			"				}\n"+
			"\n"+
			"			case LEFT:\n"+
			"				if (lookTo(UP) == FREE &&\n"+
			"					nextOwnRobotAround(UP) <= nextOtherRobotAround(UP))\n"+
			"					return SoccerAction.dribble(UP);\n"+
			"				else if (myPos.x > getFieldWidth() / 4 &&\n"+
			"						lookTo(LEFT, 2) == FREE)\n"+
			"					return SoccerAction.move(LEFT);\n"+
			"				else if (lookTo(RIGHT) == FREE &&\n"+
			"						 nextOwnRobotAround(RIGHT) <= nextOtherRobotAround(RIGHT))\n"+
			"					return SoccerAction.dribble(RIGHT);\n"+
			"				else if (lookTo(DOWN) == FREE)\n"+
			"				{\n"+
			"					if (ballPos.y < getFieldHeight() - 3 &&\n"+
			"						nextOwnRobotAround(DOWN) <= nextOtherRobotAround(DOWN))\n"+
			"						return SoccerAction.dribble(DOWN);\n"+
			"					else\n"+
			"						return SoccerAction.move(DOWN);\n"+
			"				}\n"+
			"				else\n"+
			"					return SoccerAction.nothing();\n"+
			"\n"+
			"			case RIGHT:\n"+
			"				if (lookTo(UP) == FREE &&\n"+
			"					nextOwnRobotAround(UP) <= nextOtherRobotAround(UP))\n"+
			"					return SoccerAction.dribble(UP);\n"+
			"				else if (myPos.x < getFieldWidth() * 3/4 &&\n"+
			"						lookTo(RIGHT, 2) == FREE)\n"+
			"					return SoccerAction.move(RIGHT);\n"+
			"				else if (lookTo(LEFT) == FREE &&\n"+
			"						 nextOwnRobotAround(LEFT) <= nextOtherRobotAround(LEFT))\n"+
			"					return SoccerAction.dribble(LEFT);\n"+
			"				else if (lookTo(DOWN) == FREE)\n"+
			"				{\n"+
			"					if (ballPos.y < getFieldHeight() - 3 &&\n"+
			"						nextOwnRobotAround(DOWN) <= nextOtherRobotAround(DOWN))\n"+
			"						return SoccerAction.dribble(DOWN);\n"+
			"					else\n"+
			"						return SoccerAction.move(DOWN);\n"+
			"				}\n"+
			"				else\n"+
			"					return SoccerAction.nothing();\n"+
			"\n"+
			"			case NOTHING:\n"+
			"			{\n"+
			"				int ballDirection = getRelativeDirection(myPos, ballPos);\n"+
			"\n"+
			"				if (ballPos.y == myPos.y - 1)\n"+
			"				{\n"+
			"					if ( Math.abs(ballPos.x - myPos.x) == 1 )\n"+
			"					{\n"+
			"						if (lookAt(ballPos.x, myPos.y) == FREE)\n"+
			"							return SoccerAction.move(ballDirection & HORIZONTAL);\n"+
			"						else if (lookTo(UP) == FREE)\n"+
			"							return SoccerAction.move(UP);\n"+
			"						else\n"+
			"							return SoccerAction.move(DOWN);\n"+
			"					}\n"+
			"					else if ( Math.abs(ballPos.x - myPos.x) == 2 )\n"+
			"					{\n"+
			"						if (lookAt(ballPos.x, myPos.y) == FREE)\n"+
			"							return SoccerAction.run(ballDirection & HORIZONTAL);\n"+
			"						else if (lookTo(UP) == FREE)\n"+
			"							return SoccerAction.move(UP);\n"+
			"						else\n"+
			"							return SoccerAction.move(DOWN);\n"+
			"					}\n"+
			"				}\n"+
			"				else if ((ballDirection & VERTICAL) != NOTHING)\n"+
			"				{\n"+
			"					if ( lookTo(ballDirection & VERTICAL) == FREE )\n"+
			"						return SoccerAction.run(ballDirection & VERTICAL);\n"+
			"					else\n"+
			"						return SoccerAction.move(ballDirection & HORIZONTAL);\n"+
			"				}\n"+
			"				else\n"+
			"				{\n"+
			"					if (lookTo(ballDirection & HORIZONTAL) == FREE)\n"+
			"						return SoccerAction.run(ballDirection &\n"+
			"							HORIZONTAL);\n"+
			"					else if (lookTo(DOWN) == FREE)\n"+
			"						return SoccerAction.run(DOWN);\n"+
			"					else\n"+
			"						return SoccerAction.move(UP);\n"+
			"				}\n"+
			"			}\n"+
			"			default:\n"+
			"				return SoccerAction.nothing();\n"+
			"		}\n"+
			"	}\n"+
			"}";

}
